#include "st3.hh"


void ST3::st12st3_b_transport(tlm::tlm_generic_payload &trans, sc_core::sc_time &delay){
    cout<<"received st1 insert"<<endl;
    l2pnode *dsap;
    uint32_t pte_no, pre_no;

    tlm::tlm_command cmd = trans.get_command();
    uint32_t addr = trans.get_address();
    unsigned char *ptr = trans.get_data_ptr();
    unsigned int len = trans.get_data_length();

    dsap = (l2pnode *)ptr;
    cout << "data length: "<<len<<endl;
    // cout << item.lca <<"  "<< item.pca <<endl;
    trans.set_response_status(tlm::TLM_OK_RESPONSE);

    for(int i=0;i<len;i++){
        pte_no = dsap[i].lca/4096;
        if(pte_no!=pre_no){
            
        }
        pre_no=pte_no;
    }
}